home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / setup / vbnet / 23 web forms and controls / databinding / pagingform.aspx < prev    next >
Encoding:
ASP.NET Web Form  |  2002-03-17  |  2.9 KB  |  49 lines

  1. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="PagingForm.aspx.vb" Inherits="DataBinding.PagingForm" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  3. <HTML>
  4.     <HEAD>
  5.         <title>PagingForm</title>
  6.         <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
  7.         <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
  8.         <meta content="JavaScript" name="vs_defaultClientScript">
  9.         <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  10.     </HEAD>
  11.     <body>
  12.         <form id="Form1" method="post" runat="server">
  13.             <H1>DataGrid Paging Demo</H1>
  14.             <P>This form demonstrates the three techniques for doing pagination with a DataGrid 
  15.                 control. You must change a constant in the source code to see how each mode 
  16.                 works.</P>
  17.             <P>
  18.                 <asp:DataGrid id="dgrTitles" runat="server" Width="751px" Height="185px" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="3" GridLines="Vertical" AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True" PageSize="8" AllowCustomPaging="True">
  19.                     <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
  20.                     <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
  21.                     <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
  22.                     <HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#000084"></HeaderStyle>
  23.                     <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
  24.                     <Columns>
  25.                         <asp:BoundColumn DataField="Title" SortExpression="Title" HeaderText="Title"></asp:BoundColumn>
  26.                         <asp:BoundColumn DataField="ISBN" SortExpression="ISBN" HeaderText="ISBN"></asp:BoundColumn>
  27.                         <asp:BoundColumn DataField="PubName" SortExpression="PubName" HeaderText="Publisher"></asp:BoundColumn>
  28.                         <asp:BoundColumn DataField="Year Published" SortExpression="Year Published" HeaderText="Year"></asp:BoundColumn>
  29.                     </Columns>
  30.                     <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="Black" BackColor="#999999"></PagerStyle>
  31.                 </asp:DataGrid></P>
  32.             <P>
  33.                 <asp:Panel id="Panel1" runat="server" Width="751px" Height="24px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="Navy" HorizontalAlign="Center">
  34.                     <P>
  35.                         <asp:Button id="btnFirst" runat="server" Text="First" CommandName="First"></asp:Button>  
  36.                         <asp:Button id="btnPrevious" runat="server" Text="Prev" CommandName="Prev"></asp:Button>  
  37.                          
  38.                         <asp:TextBox id="txtPage" runat="server" Width="43px"></asp:TextBox>
  39.                         <asp:Button id="btnGo" runat="server" Text="Go" CommandName="Go"></asp:Button>  
  40.                          
  41.                         <asp:Button id="btnNext" runat="server" Text="Next" CommandName="Next"></asp:Button>  
  42.                          
  43.                         <asp:Button id="btnLast" runat="server" Text="Last" CommandName="Last"></asp:Button></P>
  44.                 </asp:Panel>
  45.             <P></P>
  46.         </form>
  47.     </body>
  48. </HTML>
  49.